package com.ruoyi.miaomiao.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.miaomiao.mapper.SlidePictureMapper;
import com.ruoyi.miaomiao.domain.SlidePicture;
import com.ruoyi.miaomiao.service.ISlidePictureService;

/**
 * 轮播图管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-08-09
 */
@Service
public class SlidePictureServiceImpl implements ISlidePictureService 
{
    @Autowired
    private SlidePictureMapper slidePictureMapper;

    /**
     * 查询轮播图管理
     * 
     * @param slidepictureId 轮播图管理主键
     * @return 轮播图管理
     */
    @Override
    public SlidePicture selectSlidePictureBySlidepictureId(Long slidepictureId)
    {
        return slidePictureMapper.selectSlidePictureBySlidepictureId(slidepictureId);
    }

    /**
     * 查询轮播图管理列表
     * 
     * @param slidePicture 轮播图管理
     * @return 轮播图管理
     */
    @Override
    public List<SlidePicture> selectSlidePictureList(SlidePicture slidePicture)
    {
        return slidePictureMapper.selectSlidePictureList(slidePicture);
    }

    /**
     * 新增轮播图管理
     * 
     * @param slidePicture 轮播图管理
     * @return 结果
     */
    @Override
    public int insertSlidePicture(SlidePicture slidePicture)
    {
        slidePicture.setCreateTime(DateUtils.getNowDate());
        return slidePictureMapper.insertSlidePicture(slidePicture);
    }

    /**
     * 修改轮播图管理
     * 
     * @param slidePicture 轮播图管理
     * @return 结果
     */
    @Override
    public int updateSlidePicture(SlidePicture slidePicture)
    {
        slidePicture.setUpdateTime(DateUtils.getNowDate());
        return slidePictureMapper.updateSlidePicture(slidePicture);
    }

    /**
     * 批量删除轮播图管理
     * 
     * @param slidepictureIds 需要删除的轮播图管理主键
     * @return 结果
     */
    @Override
    public int deleteSlidePictureBySlidepictureIds(Long[] slidepictureIds)
    {
        return slidePictureMapper.deleteSlidePictureBySlidepictureIds(slidepictureIds);
    }

    /**
     * 删除轮播图管理信息
     * 
     * @param slidepictureId 轮播图管理主键
     * @return 结果
     */
    @Override
    public int deleteSlidePictureBySlidepictureId(Long slidepictureId)
    {
        return slidePictureMapper.deleteSlidePictureBySlidepictureId(slidepictureId);
    }
}
